package com.dexgdx.game.constants;

public enum EMoveDirection {
	
	SOUTH(1), 
	SOUTH_WEST(2), 
	WEST(3),
	NORTH_WEST(4),
	NORTH(5),
	NORTH_EAST(6),
	EAST(7),
	SOUTH_EAST(8);
	
	public Integer index;
	
	private EMoveDirection(int i){
		index = new Integer(i);
	}
	
	public EMoveDirection getOpposite(){
		EMoveDirection opposite = null;
		
		if(this == SOUTH)
			opposite = NORTH;
		else if(this == NORTH)
			opposite = SOUTH;
		
		else if(this == WEST)
			opposite = EAST;
		else if(this == EAST)
			opposite = WEST;
		
		else if(this == SOUTH_WEST)
			opposite = NORTH_EAST;
		else if(this == NORTH_EAST)
			opposite = SOUTH_WEST;
		
		else if(this == SOUTH_EAST)
			opposite = NORTH_WEST;
		else if(this == NORTH_WEST)
			opposite = SOUTH_EAST;
		
		return opposite;
	}
}
